import { onMounted, onUnmounted } from 'vue';
const useViewEvent= (callback) => {

    onMounted(() => {
        window.addEventListener('view', callback);
    });
    onUnmounted(() => {
        window.removeEventListener('view', callback);
    });
}

export default  useViewEvent;